package com.learn.sunday.fegin.interceptpor;

import feign.RequestInterceptor;
import feign.RequestTemplate;
import lombok.extern.slf4j.Slf4j;

import java.util.UUID;

@Slf4j
public class CustomFeignInterceptor implements RequestInterceptor {
    @Override
    public void apply(RequestTemplate requestTemplate) {
        log.info("自定义拦截器");
        String access_token = UUID.randomUUID().toString();
        requestTemplate.header("Authorization",access_token);
    }
}
